<script setup lang="ts">
import ChannelNav from '@/components/ChannelNav.vue'
import ArticleList from '@/components/ArticleList.vue'
import { ref } from 'vue'
import { useChannelStore } from '@/stores/channel'

// 定义导航栏id
// const navId = ref(0)
const store = useChannelStore()
</script>

<template>
  <!-- 顶部导航条 -->
  <ChannelNav :nav-id="store.channelId" @change-nav-id="store.changeChannelId = $event" />
  <!-- 底部列表 -->
  <ArticleList :nav-id="store.channelId" />
</template>

<style scoped></style>
